<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改招投标服务费')" />
    <th:block th:include="include :: jasny-bootstrap-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-qtfy-edit" th:object="${gcProjectQtfy}">
            <input name="id" th:field="*{id}" type="hidden">
            <input name="gcProjectid" th:field="*{gcProjectid}" type="hidden">
            <input type="hidden" id="zlwj" name="zlwj" th:value="*{zlwj}" />
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">项目编号：</label>
                <div class="col-sm-8">
                    <input name="orderNo" th:field="*{orderNo}" autoComplete="off" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">项目名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" autoComplete="off" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">供应商名称：</label>
                <div class="col-sm-8">
                    <input name="supplyName" th:field="*{supplyName}" autoComplete="off" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">项目费用类型：</label>
                <div class="col-sm-8">
                    <input name="type" th:field="*{type}" class="form-control" autoComplete="off" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">支付金额：</label>
                <div class="col-sm-8">
                    <input name="zongje" th:field="*{zongje}" autoComplete="off" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">项目描述：</label>
                <div class="col-sm-8">
                    <textarea name="descs" class="form-control">[[*{descs}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">资料文件：</label>
                <div class="col-sm-8" style="margin-top: 8px;" id="zlwjlink">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">审批意见：</label>
                <div class="col-sm-8">
                	<textarea id="spyj" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
	<div class="row">
        <div class="col-sm-offset-5 col-sm-10">
        	<button id="button-yes" type="button" class="btn btn-sm btn-primary" ><i class="fa fa-check"></i>审核通过</button>&nbsp;
            <button id="button-no" type="button" class="btn btn-sm btn-danger" ><i class="fa fa-remove"></i>审核拒绝</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: jasny-bootstrap-js" />
    <script th:src="@{/ruoyi/base64.min.js?v=20231208}"></script>
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/qtfy";
        $("#form-qtfy-edit").validate({
            focusCleanup: true
        });
        
        $(function() {
			var zilwj = $("#zlwj").val();
        	var n=zilwj.split(",");
        	for(var i=0;i<n.length;i++){
        		if(n[i]!=""){
// 	        		var url = "http://lkgnews.cn:8012/onlinePreview?url="+encodeURIComponent(Base64.encode(n[i]));
	        		var url = n[i];
	        		$("#zlwjlink").append("<a href='"+url+"' target='_blank' >"+n[i]+"</a>&nbsp;&nbsp;&nbsp;&nbsp;");
	        		$("#zlwjlink").append("<a href='"+n[i]+"' target='_blank' >下载</a><br>");
        		}
        	}
        });

        $("#button-yes").click(function(){
	    	$.modal.confirm("确认要审核通过吗?", function() {
	    		$.ajax({
    				url: "/gcgl/qtfy/yes",
    				type: "post",
    				data: { "ids": $("#id").val(),"spyj": $("#spyj").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
	    
	    $("#button-no").click(function(){
	    	$.modal.confirm("确认要审核拒绝吗?", function() {
	    		$.ajax({
    				url: "/gcgl/qtfy/no",
    				type: "post",
    				data: { "ids": $("#id").val(),"spyj": $("#spyj").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.modal.close();
                    	refreshTab();
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.modal.close();
                    	refreshTab();
    				}
    			});
	    	});
	    })
    </script>
</body>
</html>